function mouseRight(userMenuConfig) {
    window.oncontextmenu = function() {
        return false
    };
    if (event.which === 3) { //鼠标左键
        showRightMenus();
    }

    function showRightMenus(){
        let basicMenuConfig = {
            menu: [{}],
            ele: "wrap-ms-right",
            ele_item: "ms-item",
        };
        let menuConfig = $.extend({}, basicMenuConfig, userMenuConfig);

        //获取最长的itemName，以决定菜单的宽度
        let longest = userMenuConfig.menu.reduce((tmp, item, index) => {
            return tmp.itemName.length > item.itemName.length ? tmp : item;
        });
        //生成菜单
        let div = $(`<div class="${menuConfig.ele}"></div>`);
        for (let m = 0; m < menuConfig.menu.length; m++) {
            $(`<li class="${menuConfig.ele_item}" data-item="${m}" style="width:${20 + longest.itemName.length * 18}px;">
                    &nbsp;<i class="${menuConfig.menu[m].icon}" data-item="${m}"></i>&nbsp; ${menuConfig.menu[m].itemName}
                </li>`).appendTo(div);
        }
        div.prependTo("body");

        let shade = $(`<div class="shade"></div>`);
        shade.prependTo("body");

        $(`.${menuConfig.ele}`).click(function(event) {
            let dataItem = parseInt($(event.target).attr("data-item"));
            for (var k = 0; k < menuConfig.menu.length; k++) {
                if (dataItem == k) {
                    menuConfig.menu[k].callback();
                    $(`.${menuConfig.ele}`).remove();
                    $(`.shade`).remove();
                }
            }
        });
        $(".shade").mousedown(function() {
            $(`.${menuConfig.ele}`).remove();
            $(`.shade`).remove();
        })

        $("." + menuConfig.ele).css({
            "display": "block",
            "top": event.pageY + "px",
            "left": event.pageX + "px"
        })
    }
}